package com.example.yls.demoa;

import android.content.ComponentName;
import android.content.ServiceConnection;
import android.os.IBinder;
import android.util.Log;

/**
 * Created by yls on 2018/12/17.
 */

public class MyServiceConnection implements ServiceConnection {

    private MyBinder myBinder;

    @Override
    public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
        Log.e("king","onServiceConnected");
        myBinder = (MyBinder) iBinder;
    }

    @Override
    public void onServiceDisconnected(ComponentName componentName) {
        Log.e("king","onServiceDisconnected");
    }

    @Override
    public void onBindingDied(ComponentName name) {
        Log.e("king","onBindingDied");
    }



    public MyBinder getBind(){
        return myBinder;
    }

}
